<html>
<head><meta charset="utf-8"><title>pre-processed lib.rs · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/pre-processed.20lib.2Ers.html">pre-processed lib.rs</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="147377655"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/pre-processed%20lib.rs/near/147377655" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/pre-processed.20lib.2Ers.html#147377655">(Nov 09 2018 at 15:13)</a>:</h4>
<p>I have a C library that contains an <code>include!</code> which is expanded by rust from a file generated during its <code>build.rs</code> and I want to test its ABI with <code>ctest</code>, but <code>ctest</code> only takes a path to the <code>lib.rs</code> file. </p>
<p>Is there a way to point <code>ctest</code> in one crate, to the <code>lib.rs</code> with the <code>include!</code> directives removed of one of its dependencies ?</p>



<a name="147377731"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/pre-processed%20lib.rs/near/147377731" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/pre-processed.20lib.2Ers.html#147377731">(Nov 09 2018 at 15:14)</a>:</h4>
<p>AFAICT the <code>include!</code>s are replaced during macro expansion, and a version of the source files with these replaced is not written anywhere.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>